package com.abc.springboot.service.impl;

import com.abc.springboot.mapper.TeacherMapper;
import com.abc.springboot.pojo.Teacher;
import com.abc.springboot.service.TeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TeacherServiceImpl implements TeacherService {
    @Autowired
    private TeacherMapper teacherMapper;

    @Override
    public List<Teacher> queryTeachers() {
        return teacherMapper.selectTeachers();
    }

    @Override
    public Teacher queryTeacherById(int id) {
        return teacherMapper.selectTeacherById(id);
    }

    @Override
    public int updateTeacherById(Teacher teacher) {
        return teacherMapper.updateTeacherById(teacher);
    }

    @Override
    public int deleteTeacherById(int id) {
        return teacherMapper.deleteTeacherById(id);
    }


}
